""" Models/ServicesScopes Model """

from masoniteorm.models import Model

from config.config import cache


class ServicesScopes(Model):
    """Models/ServicesScopes Model"""
    __table__ = 'services_scopes'
    __hidden__ = ['name_ug','name_zh','is_delete','created_at','updated_at']
    __appends__ = ['name']

    def get_name_attribute(self):
        lan = cache.get('lan')
        if lan == 'ug':
            return self.name_ug
        return self.name_zh

    pass
